package mspbots.next.ticket.core.data.rejects;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * @author Jay Yang
 */
@RestController
@RequestMapping("reject/{tenantId}")
@RequiredArgsConstructor
public class RejectController {

    private final RejectService rejectService;

    @PostMapping("record")
    public Mono<Reject> record(@RequestBody Reject reject) {
        return this.rejectService.save(reject);
    }
}
